home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1249 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: misery.millcomm.com!not-for-mail
  2. From: llucius@millcomm.com (Yambo)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Arexx problem with vars
  5. Date: 17 Jan 1996 06:30:04 GMT
  6. Organization: the 9672-R83
  7. Message-ID: <4di51c$g7h@misery.millcomm.com>
  8. References: <68771100@0humpty.tomate.tng.oche.de>
  9. NNTP-Posting-Host: mill2.millcomm.com
  10. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  11.  
  12. Andreas Mixich (humpty@TOMATE.TNG.OCHE.DE) wrote:
  13. : list.0 = list.0 + 1
  14. : This worked.
  15. : Now I have to seperate between two lists. So I did a
  16. : IF valuexyz = xyz THEN
  17. :     x = L
  18. : ELSE
  19. :     x = R
  20. : x||list.0 = x||list.0 + 1
  21. Hey Andreas, me again...
  22.  
  23. Creating a variable name in this way (||) will not work.  There are ways 
  24. to get the kind of name (RList/LList) you want, but how about trying this?
  25.  
  26. list.x.0 = list.x.0 + 1
  27.  
  28. where:
  29.     x    = L or R
  30.  
  31. This would give variable names like:
  32.  
  33. list.L.0 or list.R.0
  34.  
  35. But, if you really must have RList and LList try:
  36.  
  37. INTERPRET z'list.0 = 'z'list.0 + 1'
  38.  
  39. This should give you what you want, but IMHO it's a bit harder to read.  
  40. Notice I used "z" instead of "x".  Using "x" in the above would produce 
  41. an error since ARexx would treat the seconds "x" to indicate a hex 
  42. string.  You could use the "||" operator to get arounds this problem or 
  43. just change the "x" to something else.
  44.  
  45. -- 
  46. __ Y_ a_ m_ b_ o_ | The leanest, meanest, fightinest sweet tater on Earth!
  47.    oo o  oo o  o  | 
  48.     o       o   o | llucius@millcomm.com
  49.  o oo    o     o  | 
  50. -- -- -- -- -- -- | http://www.millcomm.com/~llucius/index.html (coming soon)
  51.  
  52.